#ifndef GRAPHICSPLUGIN_H
#define GRAPHICSPLUGIN_H

#include <QObject>
#include <QtGui>
#include <QtSql>
#include <Maestro/mcplugins.h>
#include <Maestro/database.h>
#include<phonon>

#include "ui_graphics.h"
#include "button.h"
#include "fileselector.h"
#include "volumedisplay.h"
#include "selectiontypemenu.h"
#include "keybindings.h"
#include "playermanager.h"
#include "settings.h"
#include "themesettings.h"

namespace Ui
{
    //class GraphicsPlugin;
    class GraphicsPlugin;
}

class GraphicsPlugin : public KeyControllableMenu {
    
    Q_OBJECT
public:
    GraphicsPlugin(QWidget * parent);
    QString getName() const;
    void addButton(Button * button);
    void setMainPlugins(QList<MenuItemInterface *> * plugins);
    void mouseMoveEvent(QMouseEvent * event);
    void setStylePlugins(QList<StyleInterface *> * stylePlugins) { this->stylePlugins=stylePlugins;}
    void setAddonPlugins(QList<FileAddonInterface *> * addonPlugins) { this->addonPlugins=addonPlugins;}
    void test();
public slots:
    void addWidget(QWidget * widget);
    void hideMouse();
    void showMouse();
    void buttonSelected();
    void keyPressEvent ( QKeyEvent * event );
    void show();
    void hide();
    void close();
private:
    Ui::GraphicsPlugin *ui;
    QWidget * parentWidget;
    QList<MenuItemInterface *> * mainPlugins;
    QList<StyleInterface *> * stylePlugins;
    QList<FileAddonInterface *> * addonPlugins;
    QTimer * timer;
    QWidget * mainWidget;
    Settings * settingsManager;
signals:
    void volumeChanged(int);
protected:
    void closeEvent(QCloseEvent*);
private slots:
    void on_repeat_clicked();
    void on_shuffle_clicked();
    void on_nowPlaying_clicked();
    void on_mute_clicked();
    void on_back_clicked();
    void on_home_clicked();
    void on_close_clicked();

};

#endif // GRAPHICSPLUGIN_H
